<%@page import="com.wx.entity.User"%>
<%@page import="java.util.List"%>
<%@page import="com.wx.database.DatabaseDao"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>账户注册页面</title>
<meta name="viewport"
	content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</head>
<body>
	<%
		String openid = request.getParameter("openid");
		request.getSession().setAttribute("openid", request.getParameter("openid"));
		List<Integer> list = DatabaseDao.openidQueryUid(openid);
		if (list != null && list.size() > 0) {
			List<User> listUser = DatabaseDao.uidQueryUser(list.get(0));
			out.println("<font size=\"10px\">你已注册！</font><br />");
			out.println("用户名：" + listUser.get(0).getUsername() + "<br />");
			out.println("联系方式：" + listUser.get(0).getTel() + "<br />");
		} else {
	%>
	<form action="login.action" method="post">
		用户名: <input type="text" name="username" /> <br />手机号码: <input
			type="text" name="phone" /><br /> <input type="submit" value="提交" />
	</form>
	<%
		}
		out.println("你的openid为：" + openid);
	%>
</body>
</html>